import router from '@/router'
// import { Notify } from 'vant'
import { getToken } from '@/utils/auth'
import $store from '@/store/index'
import { isEmptyObj } from '@/utils/index'
import { SET_TOKEN } from '@/store/modules/user/mutations-types'
// 检测是否存在用户信息
const checkHasUserInfo = async() => {
  const info = $store.getters['user/info']
  if (isEmptyObj(info)) await $store.dispatch('user/info')
}
// 检测vuex是否存在token
const checkHasToken = async(token) => {
  const vuexToken = $store.getters['user/token']
  if (!vuexToken) $store.commit('user/' + SET_TOKEN, token)
}
